
<template>
  <Button type="primary" color="success" @click="handleToPage" size="small"> {{ title }} </Button>
  <MsgContentModal @register="registerModal" />
</template>

<script lang="ts" name="config" setup>
/**
 * 用于跳转到MsgContentModal页面
 */
import { useModal } from '/@/components/Modal';
import MsgContentModal from './MsgContentModal.vue'
import { Button } from '/@/components/Button';
const [registerModal, { openModal }] = useModal();
const props = defineProps({
  title: { type: String, default: '查看' },
  content: { type: String },
});

const handleToPage = () => {
  openModal(true, {
    content: props.content
  })
}

</script>